#ifndef BASEIMPL_H
#define BASEIMPL_H

#include "predef.h"
#include <sys/types.h>
#include <memory>
class BaseImpl
{
public:
    //SlaveBase();
    BaseImpl(const u_char target_index):target_index_(target_index){}
    virtual ~BaseImpl();
    virtual bool PackUserData(u_char *buffer,size_t &len)=0;
    virtual bool ParseUserData(const u_char *msg,const size_t len)=0;

    //inline virtual SlaveType GetType()const =0;
    inline u_char GetTargetIndex()const{return target_index_;}

protected:
    const u_char target_index_;
};
typedef std::shared_ptr<BaseImpl> BaseImplPtr;
#endif // BASEIMPL_H
